The present invention relates to document scanning devices. More particularly, the present invention is directed to a system and method for automatically detecting the edge of a document being scanned by a scanning system.
In the reproduction of copies of an original document from video image data created, for example, by electronic input scanning from an original document, it is often desirable to provide functions dependent upon determining the exterior edges of the document. Such features include, for example, automatic location of the document in a scanning system, electronic registration and deskewing of the electronic image. Additionally, it is desirable to perform image processing routines only upon the image data of the document and not that corresponding to the backing, e.g., a platen cover in a platen scanning system or a backing plate, baffle, ski, or backing roll in a document feeding system, such a constant velocity transport (xe2x80x9cCVTxe2x80x9d) system. Or in the case of an engineering scanner, choosing the right paper size. Furthermore, deletion of image data which falls outside the detected exterior edges of the document eliminates storing a document requiring more space than necessary.
In one method of determining the location of the document, a user would manually determine the document size and input the width, through a user interface, to the document scanning system before the document was actually scanned. In this method, the document must be centered in the document scanning system to avoid the document image from being clipped. This manual method reduces productivity and causes wasted copies, particularly when working with large documents such as are commonly seen in an engineering document scanning system wherein the input document can be quite small to slightly more than 36 inches, since a user cannot always input the correct width or center the document accurately in the document scanning.
Thus, it is desirable to provide an edge detection operation to determine the document""s edges and position when the document is being initially staged for scanning. As should be appreciated, to provide an edge detection operation the exterior edges of the document must somehow be detected by the scanning system. Conventionally, automatic edge detection processes rely on the ability of the digital scanner and/or the image processing system to sense a difference, such as the difference in reflectance between the input document""s background and the surrounding backing. However, existing edge detection methods have not been completely successful, particularly in an engineering environment wherein the document sheets can run the gamut of substrates from dark sepia to tracing paper to thick, bright bond paper to almost transparent film and can have reflectances very similar to the backing reflectance.
One such conventional auto-width detection method captures a portion of the lead edge of a document that is staged wherein the captured portion of the lead edge includes both image data related to the backing and the document itself. In this automated process, the width and position of a document is calculated by determining whether each CCD sensor element is covered by a backing or document. To make this determination, the conventional automatic detection method employs a classification process that utilizes the mean of columns of pixels of image data to differentiate between the document and the backing.
However, since the document""s brightness varies from very dark to very bright and since most bond paper and film documents have about the same brightness as the backing, the conventional auto-width detection process often fails to detect the actual location and width of the document. Moreover, the conventional method relies solely on mean data, which corresponds to a first order function. The mean data is very susceptible to electrical noise within the CCD sensors or dust and dirt within the actual scanning system. In other words, any excessive electric noise, dust, or dirt could readily render the conventional edge detection process ineffective.
To eliminate the shortcomings associated with using a detection function based on a first order function, U.S. Pat. No. 6,046,828 teaches a method and system for providing automatic detection of the width and position of a document that filters the scanned image data and utilizes second order statistics to identify the transition between the backing and the document. While the system and method taught by U.S. Pat. No. 6,046,828 provides improved edge detection over conventional methods relying on mean data alone, several factors limit its effectiveness.
For example, in an ideal environment the backing has a constant reflectance; however, since it contacts the document it becomes dirty and scuffed causing vertical streaks to appear. Furthermore, problems with particular CCD elements or calibration could cause vertical streaks to appear. Additionally, as indicated above, documents such as engineering drawings can run the gamut of substrates from dark sepia to tracing paper to thick, bright bond paper to almost transparent film and can be in terrible condition with ragged, torn edges. All these factors confound efforts to detect document edges based on jumps in reflectance.
Therefore, it is desirable to have an effective automatic edge detection system that is robust enough to handle the varying conditions and the wide range of document substrates encountered.
One aspect of the present invention is a method for automatically detecting an edge of a document in a scanning system. The method includes (a) scanning a portion of the document against a substantially light reflecting backing to obtain a first set of image data; (b) scanning a portion of the document against a substantially light absorbing backing to obtain a second set of image data; (c) calculating a set of first values from the first set of image data, each one of the first values being a first-order statistic; (d) calculating a set of second values from the second set of image data, each one of the second values being a first-order statistic; and (e) determining a detected edge of the document from the set of first values and the set of second values.
In accordance another aspect of the present invention there is provided a method for detecting an edge of a document. The method includes: (a) scanning a portion of the document against a substantially light reflecting backing to obtain a first set of image data; (b) scanning a portion of the document against a substantially light absorbing backing to obtain a second set of image data; (c) calculating a set of first values from the first set of image data, each one of the first values being a first-order statistic; (d) calculating a set of second values from the second set of image data, each one of the second values being a first-order statistic; (e) calculating a set of third values from the second set of image data, each one of the third values being a second-order statistic; (f) calculating a set of fourth values from the second set of image data, each one of the fourth values being a fourth-order statistic; (g) determining a first edge detection from the set of first values and the set of second values; (h) determining a second edge detection from the set of first values and the set of second values; (i) determining a third edge detection from the set of first values, the set of second values and the set of fourth values; and (k) reconciling the first edge detection, the second edge detection and the third edge detection to obtain a document edge.